import type { ArticleItem, ArticlePageParams } from '@/types/article'
import type { PageResult } from '@/types/global'
import { http } from '@/utils/http'

/**
 * 通知公告
 * @param data 请求参数
 */
export const getArticleListApi = (data?: ArticlePageParams) => {
  return http<PageResult<ArticleItem>>({
    method: 'GET',
    url: '/admin/home/appArticlePage',
    data,
  })
}

export const getArticleDetailApi = (id: string) => {
  return http<ArticleItem>({
    method: 'GET',
    url: `/admin/home/detailsArticle/${id}`,
  })
}
